(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

selects(x', revprefix, Cons(x, xs)) → Cons(Cons(x', revapp(revprefix, Cons(x, xs))), selects(x, Cons(x', revprefix), xs))
select(Cons(x, xs)) → selects(x, Nil, xs)
revapp(Cons(x, xs), rest) → revapp(xs, Cons(x, rest))
selects(x, revprefix, Nil) → Cons(Cons(x, revapp(revprefix, Nil)), Nil)
select(Nil) → Nil
revapp(Nil, rest) → rest

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

selects(z0, z1, Cons(z2, z3)) → Cons(Cons(z0, revapp(z1, Cons(z2, z3))), selects(z2, Cons(z0, z1), z3))
selects(z0, z1, Nil) → Cons(Cons(z0, revapp(z1, Nil)), Nil)
select(Cons(z0, z1)) → selects(z0, Nil, z1)
select(Nil) → Nil
revapp(Cons(z0, z1), z2) → revapp(z1, Cons(z0, z2))
revapp(Nil, z0) → z0
Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
SELECT(Cons(z0, z1)) → c2(SELECTS(z0, Nil, z1))
SELECT(Nil) → c3
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
REVAPP(Nil, z0) → c5
S tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
SELECT(Cons(z0, z1)) → c2(SELECTS(z0, Nil, z1))
SELECT(Nil) → c3
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
REVAPP(Nil, z0) → c5
K tuples:none
Defined Rule Symbols:

selects, select, revapp

Defined Pair Symbols:

SELECTS, SELECT, REVAPP

Compound Symbols:

c, c1, c2, c3, c4, c5

(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

SELECT(Cons(z0, z1)) → c2(SELECTS(z0, Nil, z1))
Removed 2 trailing nodes:

SELECT(Nil) → c3
REVAPP(Nil, z0) → c5

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

selects(z0, z1, Cons(z2, z3)) → Cons(Cons(z0, revapp(z1, Cons(z2, z3))), selects(z2, Cons(z0, z1), z3))
selects(z0, z1, Nil) → Cons(Cons(z0, revapp(z1, Nil)), Nil)
select(Cons(z0, z1)) → selects(z0, Nil, z1)
select(Nil) → Nil
revapp(Cons(z0, z1), z2) → revapp(z1, Cons(z0, z2))
revapp(Nil, z0) → z0
Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
S tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
K tuples:none
Defined Rule Symbols:

selects, select, revapp

Defined Pair Symbols:

SELECTS, REVAPP

Compound Symbols:

c, c1, c4

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

selects(z0, z1, Cons(z2, z3)) → Cons(Cons(z0, revapp(z1, Cons(z2, z3))), selects(z2, Cons(z0, z1), z3))
selects(z0, z1, Nil) → Cons(Cons(z0, revapp(z1, Nil)), Nil)
select(Cons(z0, z1)) → selects(z0, Nil, z1)
select(Nil) → Nil
revapp(Cons(z0, z1), z2) → revapp(z1, Cons(z0, z2))
revapp(Nil, z0) → z0

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
S tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

SELECTS, REVAPP

Compound Symbols:

c, c1, c4

(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
We considered the (Usable) Rules:none
And the Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(Cons(x1, x2)) = 0   
POL(Nil) = 0   
POL(REVAPP(x1, x2)) = 0   
POL(SELECTS(x1, x2, x3)) = [1] + x2   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
S tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
K tuples:

SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
Defined Rule Symbols:none

Defined Pair Symbols:

SELECTS, REVAPP

Compound Symbols:

c, c1, c4

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
We considered the (Usable) Rules:none
And the Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(Cons(x1, x2)) = [1] + x1 + x2   
POL(Nil) = 0   
POL(REVAPP(x1, x2)) = 0   
POL(SELECTS(x1, x2, x3)) = [1] + x3   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
S tuples:

REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
K tuples:

SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
Defined Rule Symbols:none

Defined Pair Symbols:

SELECTS, REVAPP

Compound Symbols:

c, c1, c4

(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
We considered the (Usable) Rules:none
And the Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(Cons(x1, x2)) = [2] + x2   
POL(Nil) = 0   
POL(REVAPP(x1, x2)) = x1   
POL(SELECTS(x1, x2, x3)) = x2 + x32 + x2·x3   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
S tuples:none
K tuples:

SELECTS(z0, z1, Nil) → c1(REVAPP(z1, Nil))
SELECTS(z0, z1, Cons(z2, z3)) → c(REVAPP(z1, Cons(z2, z3)), SELECTS(z2, Cons(z0, z1), z3))
REVAPP(Cons(z0, z1), z2) → c4(REVAPP(z1, Cons(z0, z2)))
Defined Rule Symbols:none

Defined Pair Symbols:

SELECTS, REVAPP

Compound Symbols:

c, c1, c4

(13) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(14) BOUNDS(1, 1)